#!/bin/bash
cd ~/app-root/data/temp/pkg/
#wget -t1 -l1 -np -nd --accept=html http://releases.mozilla.org/pub/firefox/nightly/latest-mozilla-central-l10n/ -O index.html
sed -i "5c pkgver=`cat ~/app-root/data/temp/firefox/oldnightly`" firefox-nightly-zh-cn/PKGBUILD
sed -i "3c pkgver = `cat ~/app-root/data/temp/firefox/oldnightly`" firefox-nightly-zh-cn/.SRCINFO
diff -q firefox-nightly-zh-cn/ tmp/firefox-nightly-zh-cn/ | sed -e 's#Files ##' -e 's#and.*differ##' >diff.txt
zip pkg.zip -r $(cat diff.txt)
rm -rf firefox-nightly-zh-cn index.html diff.txt